@JoeCFD No, I refuse to. I tried once, perfectly healthy code that I maintained for 3 years on MingW didn't even want to compile (it was Qt only, no external libs), I refused to waste my time on Microsoft shenanigans.
Anyway, I got it to work. I was missing one thing in MinGW. For the record:
to use WinAPI with MinGW (I do it via Msys2) two packages are needed (I was missing the latter): msys2-w32api-headers and msys2-w32api-runtime.
.pro file in the end looks like I was expecting:
LIBS += -LC:/msys64/usr/lib/w32api/ -liphlpapi
LIBS += -LC:/msys64/usr/lib/w32api/ -lws2_32
INCLUDEPATH += C:/msys64/usr/include/w32api
DEPENDPATH += C:/msys64/usr/lib/w32api
Thank you everyone who contributed, thanks to your input I was able to trace and find my error. As always, your help is much appreciated.